﻿<%@ Page Title="Sprava uzivatelu v galerii" Language="C#" MasterPageFile="~/index.Master" AutoEventWireup="true"
    CodeBehind="SpravaUzivateluVgalerii.aspx.cs" Inherits="Fotobanka.SpravaUzivateluVgalerii" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Obsah" runat="server">
    <center>
        <h1>
            Sprava uzivatelu v galerii</h1>
        <br />
        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    </center>
    <a href="ListGalerii.aspx">Zpet</a>
    <br />
    <br />
    <asp:DropDownList ID="lide" runat="server" DataSourceID="ObjectDataSource1" DataTextField="Email"
        DataValueField="Id" Style="margin-left: 0px">
    </asp:DropDownList>
    <asp:Button ID="addButton" runat="server" BorderColor="Black" BorderWidth="1px" 
        Text="Přidat uživatele" onclick="addButton_Click" /><br />
    
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataSourceID="ObjectDataSource2" ForeColor="#333333" 
        GridLines="None" DataKeyNames="Id" onrowdatabound="GridView1_RowDataBound">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="FirstName" HeaderText="Jméno" SortExpression="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="Příjmení" SortExpression="LastName" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="SelectUsersSPrirazenouGalerii" 
        TypeName="Fotobanka.UserGalleriesManager" DeleteMethod="deleteFromDB" EnableCaching="false" OnDeleted="OnDeleted">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="gallery_id" QueryStringField="id" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="SelectUsersBezPrirazeneGalerie" 
        TypeName="Fotobanka.UserGalleriesManager">
        <SelectParameters>
            <asp:QueryStringParameter Name="gallery_id" QueryStringField="id" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Ovladaci_panel" runat="server">
</asp:Content>
